/*
 * @Description: 
 * @Version: 2.0
 * @Autor: Seven
 * @Date: 2020-11-10 21:39:22
 * @LastEditors: Seven
 * @LastEditTime: 2020-11-26 17:11:50
 */
#include "Mesh.h"

int main()
{
    std::shared_ptr<RectangleDomain> r(new RectangleDomain({{0,0},{1,0},{1,1},{0,1}}),std::default_delete<RectangleDomain>());
    Mesh<2> *m;
    m = new P2Mesh(r,{2,2});
    std::cout << m -> n_element() << std::endl;
    std::cout << m -> n_dofs() << std::endl;
    std::cout << m -> x_seg() << " " << m -> x_h()<<std::endl;
    std::cout << m -> y_seg() << " " << m -> y_h()<<std::endl;
    std::cout << m ->DofsofIndex(11) << std::endl;
    std::vector<int> temp = m ->NodeofEle(4);
    for(int i = 0;i < temp.size();i++)
        std::cout << temp[i] << " ";
    std::cout << std::endl;
    for(int i = 0;i < m->Boundary().size();i++)
        std::cout << m->Boundary()[i] << " ";   
    std::cout << m->IsBoundary(24) << std::endl; 
    return 0; 
}